Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️Remove hard code manifest version and hash #3707

Closed
wants to merge 1 commit into from

Conversation

jichenjc
Copy link
Contributor

@jichenjc jichenjc commented Sep 29, 2020

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
⚠️Fixes #3505

(*clusterClient).CertManager: changed from func() CertManagerClient to func() (CertManagerClient, error)
Client.CertManager: changed from func() CertManagerClient to func() (CertManagerClient, error)

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 29, 2020
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 29, 2020
Copy link
Contributor

@wfernandes wfernandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jichenjc! I'm guessing you are still working on this PR so I'll do a full review when you're done with it.

But just a couple of thoughts:

  • Feel free to add Fixes #3505 in the description of this PR so it's linked to the corresponding issue.
  • I wonder if the vars embeddedCertManagerManifestVersion and embeddedCertManagerManifestHash can be part of the certManagerClient rather than used as globals. That way, we can set these values in the client constructor. WDYT?

// run `go test` against this package. THe Test_VersionMarkerUpToDate will output
// the expected hash if it does not match the hash here.
embeddedCertManagerManifestHash = "af8c08a8eb65d102ba98889a89f4ad1d3db5d302edb5b8f8f3e69bb992faa211"
certmanagerVersionLable = "helm.sh/chart"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be aware that currently the label is helm.sh/chart=cert-manager-v0.16.1. We've been using just the value v0.16.1 in our embeddedCertManagerManifestVersion.

Copy link
Contributor Author

@jichenjc jichenjc Sep 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly, I noticed that , thanks for the reminder

and I will check all above comments then reflect in my PR when it's read for review :)
thanks~

@jichenjc jichenjc force-pushed the bug/3505 branch 2 times, most recently from 01bdef0 to 98709af Compare September 30, 2020 08:33
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 30, 2020
@jichenjc jichenjc force-pushed the bug/3505 branch 2 times, most recently from 1b0f0a1 to 6997768 Compare September 30, 2020 09:06
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jichenjc thanks for this PR!
first pass, but overall the approach looks good to me

cmd/clusterctl/client/cluster/cert_manager.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/cert_manager.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/cert_manager.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/cert_manager.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/cert_manager.go Outdated Show resolved Hide resolved
@vincepri
Copy link
Member

/milestone v0.3.11

@k8s-ci-robot k8s-ci-robot added this to the v0.3.11 milestone Sep 30, 2020
@vincepri vincepri changed the base branch from master to release-0.3 October 9, 2020 19:00
@vincepri
Copy link
Member

vincepri commented Oct 9, 2020

Changed the base branch to be release-0.3, we'll have to forward-port these changes to v0.4 later

@vincepri
Copy link
Member

/retest

@jichenjc jichenjc force-pushed the bug/3505 branch 8 times, most recently from 1ac5584 to a948f88 Compare October 22, 2020 08:48
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jichenjc thanks for restarting this effort
Some nits, but overall I'm looking forward to get this merger soon

cmd/clusterctl/client/cluster/cert_manager.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/cert_manager.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/cert_manager.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/cert_manager.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/cert_manager.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/cert_manager_test.go Outdated Show resolved Hide resolved
@jichenjc jichenjc changed the title WIP: Remove hard code manifest version and hash Remove hard code manifest version and hash Oct 22, 2020
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jichenjc thanks for addressing all the comments! really appreciated!
lgtm pending addressing CI errors

@jichenjc jichenjc force-pushed the bug/3505 branch 2 times, most recently from 005f66d to 68dacb9 Compare November 9, 2020 10:28
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2020
Copy link
Contributor

@wfernandes wfernandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jichenjc One last thing. I think we'll be good to go after this. Thanks!

Comment on lines 57 to 58
g.Expect(cm.embeddedCertManagerManifestVersion).ToNot(Equal(nil))
g.Expect(cm.embeddedCertManagerManifestHash).ToNot(Equal(nil))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these values are strings it makes more sense to check if they are empty instead of nil because they'll technically always be not nil since the default will be "".

Suggested change
g.Expect(cm.embeddedCertManagerManifestVersion).ToNot(Equal(nil))
g.Expect(cm.embeddedCertManagerManifestHash).ToNot(Equal(nil))
g.Expect(cm.embeddedCertManagerManifestVersion).ToNot(BeEmpty())
g.Expect(cm.embeddedCertManagerManifestHash).ToNot(BeEmpty())

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the reminder ~ :)

will update

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 10, 2020
@k8s-ci-robot
Copy link
Contributor

@jichenjc: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cluster-api-test 6997768 link /test pull-cluster-api-test
pull-cluster-api-apidiff-release-0-3 2cd042c link /test pull-cluster-api-apidiff-release-0-3

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign fabriziopandini after the PR has been reviewed.
You can assign the PR to them by writing /assign @fabriziopandini in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fabriziopandini
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 10, 2020
@vincepri
Copy link
Member

Should this be a ⚠️ ?

  • (*clusterClient).CertManager: changed from func() CertManagerClient to func() (CertManagerClient, error)
  • Client.CertManager: changed from func() CertManagerClient to func() (CertManagerClient, error)

@vincepri
Copy link
Member

/assign @CecileRobertMichon
for approval

@CecileRobertMichon
Copy link
Contributor

@vincepri why is this targeting v0.3? Is it fixing a bug or is it simply cleanup / enabling more flexibility? If not, maybe it belongs in 0.4, especially if it's breaking...

@vincepri
Copy link
Member

vincepri commented Nov 10, 2020

I'm fine moving it to v0.4.0 - although the bug/PR came around v0.3.10 and didn't make it in

@jichenjc jichenjc changed the title Remove hard code manifest version and hash ⚠️Remove hard code manifest version and hash Nov 11, 2020
@jichenjc
Copy link
Contributor Author

@vincepri @CecileRobertMichon so please help to guide and confirm that I need target to v0.4 (I think it's master? ) thanks

@CecileRobertMichon
Copy link
Contributor

will let @fabriziopandini make the call based on the importance of the fix since he opened the original issue... My personal preference is to move all non-critical bugs to v0.4 at this point but if this is fixing something significant and the risk is low I'm fine with keeping it in 0.3.

@fabriziopandini
Copy link
Member

Given that this is a code cleanup, not user-facing, I'm ok to move this to v0.4.0

@jichenjc
Copy link
Contributor Author

@vincepri @fabriziopandini @wfernandes thanks for point out
#3908 is created (I don't know how to change pull target from v0.3 to master), so created a new PR , will close that one when this new one is merged

@CecileRobertMichon
Copy link
Contributor

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 11, 2020
@vincepri
Copy link
Member

Closing in favor of #3908

/close

@k8s-ci-robot
Copy link
Contributor

@vincepri: Closed this PR.

In response to this:

Closing in favor of #3908

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants